3.1.42 \(\int (d+e x^n) (a+b x^n+c x^{2 n}) \, dx\)

Optimal. Leaf size=62 \[ \frac {x^{n+1} (a e+b d)}{n+1}+a d x+\frac {x^{2 n+1} (b e+c d)}{2 n+1}+\frac {c e x^{3 n+1}}{3 n+1} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {1407} \begin {gather*} \frac {x^{n+1} (a e+b d)}{n+1}+a d x+\frac {x^{2 n+1} (b e+c d)}{2 n+1}+\frac {c e x^{3 n+1}}{3 n+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

a*d*x + ((b*d + a*e)*x^(1 + n))/(1 + n) + ((c*d + b*e)*x^(1 + 2*n))/(1 + 2*n) + (c*e*x^(1 + 3*n))/(1 + 3*n)

Rule 1407

Int[((d_) + (e_.)*(x_)^(n_))^(q_.)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x^n)^q*(a + b*x^n + c*x^(2*n)), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 -
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[q, 0]

Rubi steps

\begin {align*} \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx &=\int \left (a d+(b d+a e) x^n+(c d+b e) x^{2 n}+c e x^{3 n}\right ) \, dx\\ &=a d x+\frac {(b d+a e) x^{1+n}}{1+n}+\frac {(c d+b e) x^{1+2 n}}{1+2 n}+\frac {c e x^{1+3 n}}{1+3 n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 57, normalized size = 0.92 \begin {gather*} x \left (\frac {x^n (a e+b d)}{n+1}+a d+\frac {x^{2 n} (b e+c d)}{2 n+1}+\frac {c e x^{3 n}}{3 n+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

x*(a*d + ((b*d + a*e)*x^n)/(1 + n) + ((c*d + b*e)*x^(2*n))/(1 + 2*n) + (c*e*x^(3*n))/(1 + 3*n))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.07, size = 0, normalized size = 0.00 \begin {gather*} \int \left (d+e x^n\right ) \left (a+b x^n+c x^{2 n}\right ) \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(d + e*x^n)*(a + b*x^n + c*x^(2*n)),x]

[Out]

a*d*x + Defer[IntegrateAlgebraic][x^n*(b*d + a*e + c*d*x^n + b*e*x^n + c*e*x^(2*n)), x]

________________________________________________________________________________________

fricas [B]  time = 0.94, size = 137, normalized size = 2.21 \begin {gather*} \frac {{\left (2 \, c e n^{2} + 3 \, c e n + c e\right )} x x^{3 \, n} + {\left (3 \, {\left (c d + b e\right )} n^{2} + c d + b e + 4 \, {\left (c d + b e\right )} n\right )} x x^{2 \, n} + {\left (6 \, {\left (b d + a e\right )} n^{2} + b d + a e + 5 \, {\left (b d + a e\right )} n\right )} x x^{n} + {\left (6 \, a d n^{3} + 11 \, a d n^{2} + 6 \, a d n + a d\right )} x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

((2*c*e*n^2 + 3*c*e*n + c*e)*x*x^(3*n) + (3*(c*d + b*e)*n^2 + c*d + b*e + 4*(c*d + b*e)*n)*x*x^(2*n) + (6*(b*d
 + a*e)*n^2 + b*d + a*e + 5*(b*d + a*e)*n)*x*x^n + (6*a*d*n^3 + 11*a*d*n^2 + 6*a*d*n + a*d)*x)/(6*n^3 + 11*n^2
 + 6*n + 1)

________________________________________________________________________________________

giac [B]  time = 0.35, size = 207, normalized size = 3.34 \begin {gather*} \frac {6 \, a d n^{3} x + 3 \, c d n^{2} x x^{2 \, n} + 6 \, b d n^{2} x x^{n} + 2 \, c n^{2} x x^{3 \, n} e + 3 \, b n^{2} x x^{2 \, n} e + 6 \, a n^{2} x x^{n} e + 11 \, a d n^{2} x + 4 \, c d n x x^{2 \, n} + 5 \, b d n x x^{n} + 3 \, c n x x^{3 \, n} e + 4 \, b n x x^{2 \, n} e + 5 \, a n x x^{n} e + 6 \, a d n x + c d x x^{2 \, n} + b d x x^{n} + c x x^{3 \, n} e + b x x^{2 \, n} e + a x x^{n} e + a d x}{6 \, n^{3} + 11 \, n^{2} + 6 \, n + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

(6*a*d*n^3*x + 3*c*d*n^2*x*x^(2*n) + 6*b*d*n^2*x*x^n + 2*c*n^2*x*x^(3*n)*e + 3*b*n^2*x*x^(2*n)*e + 6*a*n^2*x*x
^n*e + 11*a*d*n^2*x + 4*c*d*n*x*x^(2*n) + 5*b*d*n*x*x^n + 3*c*n*x*x^(3*n)*e + 4*b*n*x*x^(2*n)*e + 5*a*n*x*x^n*
e + 6*a*d*n*x + c*d*x*x^(2*n) + b*d*x*x^n + c*x*x^(3*n)*e + b*x*x^(2*n)*e + a*x*x^n*e + a*d*x)/(6*n^3 + 11*n^2
 + 6*n + 1)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 66, normalized size = 1.06 \begin {gather*} \frac {c e x \,{\mathrm e}^{3 n \ln \relax (x )}}{3 n +1}+a d x +\frac {\left (a e +b d \right ) x \,{\mathrm e}^{n \ln \relax (x )}}{n +1}+\frac {\left (b e +c d \right ) x \,{\mathrm e}^{2 n \ln \relax (x )}}{2 n +1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^n+d)*(b*x^n+c*x^(2*n)+a),x)

[Out]

a*d*x+(a*e+b*d)/(n+1)*x*exp(n*ln(x))+(b*e+c*d)/(2*n+1)*x*exp(n*ln(x))^2+c*e/(3*n+1)*x*exp(n*ln(x))^3

________________________________________________________________________________________

maxima [A]  time = 0.55, size = 82, normalized size = 1.32 \begin {gather*} a d x + \frac {c e x^{3 \, n + 1}}{3 \, n + 1} + \frac {c d x^{2 \, n + 1}}{2 \, n + 1} + \frac {b e x^{2 \, n + 1}}{2 \, n + 1} + \frac {b d x^{n + 1}}{n + 1} + \frac {a e x^{n + 1}}{n + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)*(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

a*d*x + c*e*x^(3*n + 1)/(3*n + 1) + c*d*x^(2*n + 1)/(2*n + 1) + b*e*x^(2*n + 1)/(2*n + 1) + b*d*x^(n + 1)/(n +
 1) + a*e*x^(n + 1)/(n + 1)

________________________________________________________________________________________

mupad [B]  time = 1.66, size = 59, normalized size = 0.95 \begin {gather*} a\,d\,x+\frac {x\,x^{2\,n}\,\left (b\,e+c\,d\right )}{2\,n+1}+\frac {x\,x^n\,\left (a\,e+b\,d\right )}{n+1}+\frac {c\,e\,x\,x^{3\,n}}{3\,n+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x^n)*(a + b*x^n + c*x^(2*n)),x)

[Out]

a*d*x + (x*x^(2*n)*(b*e + c*d))/(2*n + 1) + (x*x^n*(a*e + b*d))/(n + 1) + (c*e*x*x^(3*n))/(3*n + 1)

________________________________________________________________________________________

sympy [A]  time = 1.32, size = 656, normalized size = 10.58 \begin {gather*} \begin {cases} a d x + a e \log {\relax (x )} + b d \log {\relax (x )} - \frac {b e}{x} - \frac {c d}{x} - \frac {c e}{2 x^{2}} & \text {for}\: n = -1 \\a d x + 2 a e \sqrt {x} + 2 b d \sqrt {x} + b e \log {\relax (x )} + c d \log {\relax (x )} - \frac {2 c e}{\sqrt {x}} & \text {for}\: n = - \frac {1}{2} \\a d x + \frac {3 a e x^{\frac {2}{3}}}{2} + \frac {3 b d x^{\frac {2}{3}}}{2} + 3 b e \sqrt [3]{x} + 3 c d \sqrt [3]{x} + c e \log {\relax (x )} & \text {for}\: n = - \frac {1}{3} \\\frac {6 a d n^{3} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {11 a d n^{2} x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 a d n x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {a d x}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 a e n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {5 a e n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {a e x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {6 b d n^{2} x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {5 b d n x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {b d x x^{n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 b e n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {4 b e n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {b e x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 c d n^{2} x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {4 c d n x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {c d x x^{2 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {2 c e n^{2} x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {3 c e n x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} + \frac {c e x x^{3 n}}{6 n^{3} + 11 n^{2} + 6 n + 1} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**n)*(a+b*x**n+c*x**(2*n)),x)

[Out]

Piecewise((a*d*x + a*e*log(x) + b*d*log(x) - b*e/x - c*d/x - c*e/(2*x**2), Eq(n, -1)), (a*d*x + 2*a*e*sqrt(x)
+ 2*b*d*sqrt(x) + b*e*log(x) + c*d*log(x) - 2*c*e/sqrt(x), Eq(n, -1/2)), (a*d*x + 3*a*e*x**(2/3)/2 + 3*b*d*x**
(2/3)/2 + 3*b*e*x**(1/3) + 3*c*d*x**(1/3) + c*e*log(x), Eq(n, -1/3)), (6*a*d*n**3*x/(6*n**3 + 11*n**2 + 6*n +
1) + 11*a*d*n**2*x/(6*n**3 + 11*n**2 + 6*n + 1) + 6*a*d*n*x/(6*n**3 + 11*n**2 + 6*n + 1) + a*d*x/(6*n**3 + 11*
n**2 + 6*n + 1) + 6*a*e*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*a*e*n*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1)
 + a*e*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 6*b*d*n**2*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 5*b*d*n*x*x**n/(
6*n**3 + 11*n**2 + 6*n + 1) + b*d*x*x**n/(6*n**3 + 11*n**2 + 6*n + 1) + 3*b*e*n**2*x*x**(2*n)/(6*n**3 + 11*n**
2 + 6*n + 1) + 4*b*e*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + b*e*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) +
 3*c*d*n**2*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 4*c*d*n*x*x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + c*d*x*
x**(2*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 2*c*e*n**2*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1) + 3*c*e*n*x*x**(3*n
)/(6*n**3 + 11*n**2 + 6*n + 1) + c*e*x*x**(3*n)/(6*n**3 + 11*n**2 + 6*n + 1), True))

________________________________________________________________________________________